Skip to content

Conversation

@christophe-havard-sonarsource

No description provided.

@christophe-havard-sonarsource christophe-havard-sonarsource changed the title Create sqlquery.php PR that raises vulnerabilities Feb 22, 2022
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability E 1 Vulnerability
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@ghost
Copy link

ghost commented Jun 28, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability E 2 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

{
$userId = $request->get('name');
$sql = "SELECT username FROM user WHERE id='$userId'";
$statement = $this->connection->prepare($sql);

Check failure

Code scanning / SonarCloudsquad-1

Database queries should not be vulnerable to injection attacks

<!--SONAR_ISSUE_KEY:AYGqXA5_KW4f87dK4H5--->Change this code to not construct SQL queries directly from user-controlled data.
{
$userId = $request->get('id');
$sql = "SELECT email FROM user WHERE id='$userId'";
$statement = $this->connection->prepare($sql);

Check failure

Code scanning / SonarCloudsquad-1

Database queries should not be vulnerable to injection attacks

<!--SONAR_ISSUE_KEY:AYGqXA5_KW4f87dK4H5_-->Change this code to not construct SQL queries directly from user-controlled data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants